-
Notifications
You must be signed in to change notification settings - Fork 94
added format shortcut key in editor #2385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added format shortcut key in editor #2385
Conversation
|
Should i also remove file https://github.com/tscircuit/tscircuit.com/blob/main/src/components/RunButton.tsx ? |
| }) | ||
| } | ||
| } | ||
| }, [currentFile, files, toast]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toast dep?
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
seveibar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much pollution in an important file
Moving of handleFormatFile() ?, |
he means move it to seperate files so there's not too much noise on an important file like that |
…ta584/tscircuit.com into editor-format-shortcut
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
|
|
||
| const handleFormatFile = useCallback(() => { | ||
| handleFormatFileRaw({ files, currentFile, updateFileContent, toast }) | ||
| }, [currentFile, files, toast]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }, [currentFile, files, toast]) | |
| }, [currentFile, files]) |
src/lib/utils/handle-format-file.ts
Outdated
| }) { | ||
| if (!window.prettier || !window.prettierPlugins) return | ||
| if (!currentFile) return | ||
| try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try block is too big, make it targeted
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
rushabhcodes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@Sahil-Gupta584 until perf issues are fixed, we’re not adding LoC to this |
Conneccted to tscircuit/runframe#2253
Preview:
cursorful-video-1767338417741.mp4